<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" th:src="@{/js/jquery-3.4.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.all.js}"></script>
</head>
<body>


<div class="demoTable">
    请输入书名或作者：
    <div class="layui-inline">
        <input class="layui-input" id="keyword" placeholder="请输入书名或作者">
    </div>
    <button class="layui-btn" data-type="reload">搜索</button>
</div>


<script>
    layui.use('table', function(){
        $('.demoTable .layui-btn').on('click', function(){
            var keyword = $('#keyword').val();
            $.get("/novel/"+keyword, function(result){
                $("div").html(result);
            });
        });
    });
</script>
</body>
</html>